package com.student.model;

import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Reply entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "Reply", schema = "dbo", catalog = "StudentManager")
public class Reply implements java.io.Serializable {

	// Fields

	private Long replyId;
	private MessageBoard messageBoard;
	private String replyPerson;
	private Timestamp replyTime;
	private String replyContent;

	// Constructors

	/** default constructor */
	public Reply() {
	}

	/** minimal constructor */
	public Reply(Long replyId, String replyPerson, String replyContent) {
		this.replyId = replyId;
		this.replyPerson = replyPerson;
		this.replyContent = replyContent;
	}

	/** full constructor */
	public Reply(Long replyId, MessageBoard messageBoard, String replyPerson,
			Timestamp replyTime, String replyContent) {
		this.replyId = replyId;
		this.messageBoard = messageBoard;
		this.replyPerson = replyPerson;
		this.replyTime = replyTime;
		this.replyContent = replyContent;
	}

	// Property accessors
	@Id
	@Column(name = "Reply_id", unique = true, nullable = false, precision = 18, scale = 0)
	@GeneratedValue
	public Long getReplyId() {
		return this.replyId;
	}

	public void setReplyId(Long replyId) {
		this.replyId = replyId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "MessageBoard_id")
	public MessageBoard getMessageBoard() {
		return this.messageBoard;
	}

	public void setMessageBoard(MessageBoard messageBoard) {
		this.messageBoard = messageBoard;
	}

	@Column(name = "Reply_Person", nullable = false, length = 20)
	public String getReplyPerson() {
		return this.replyPerson;
	}

	public void setReplyPerson(String replyPerson) {
		this.replyPerson = replyPerson;
	}

	@Column(name = "Reply_Time", length = 23)
	public Timestamp getReplyTime() {
		return this.replyTime;
	}

	public void setReplyTime(Timestamp replyTime) {
		this.replyTime = replyTime;
	}

	@Column(name = "Reply_Content", nullable = false)
	public String getReplyContent() {
		return this.replyContent;
	}

	public void setReplyContent(String replyContent) {
		this.replyContent = replyContent;
	}

}